home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Commun⁄Network / Telnet 2.5.src.ThinkC / source / whatami.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-06  |  3.6 KB  |  145 lines  |  [TEXT/MPS ]

  1. /*
  2. *    Whatami.h
  3. *  Machine specific information for NCSA Telnet TCP/IP kernel
  4. ****************************************************************************
  5. *                                                                          *
  6. *                                                                          *
  7. *      NCSA Telnet                                                         *
  8. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  9. *                                                                          *
  10. *      National Center for Supercomputing Applications                     *
  11. *      152 Computing Applications Building                                 *
  12. *      605 E. Springfield Ave.                                             *
  13. *      Champaign, IL  61820                                                *
  14. *                                                                          *
  15. *    Copyright (c) 1987, Board of Trustees of the University of Illinois   *
  16. *                                                                          *
  17. ****************************************************************************
  18. *   Defines for TCP/IP library, are you a Mac or a PC?
  19. */
  20.  
  21. #define MAC 1    /* BYU LSC */
  22.  
  23. #ifndef MAC
  24. #define PC 1
  25. #define ETHER 1
  26. #define UB 1 
  27. #endif
  28.  
  29. #define ETHER
  30.  
  31. #ifndef ETHER
  32. #define ATALK 1
  33. #endif
  34.  
  35. #define NOT_FROM_SLIP 0        /* BYU 2.4.16 */
  36. #define FROM_SLIP 1            /* BYU 2.4.16 */
  37.  
  38. /*
  39. *   Defines which have to do with Ethernet addressing versus Appletalk
  40. *   addressing.  Ethernet has 6 bytes of hardware address, ATALK has 4
  41. */
  42. #ifdef ETHER
  43. #define DADDLEN 6
  44. #define WINDOWSIZE 4096
  45. #define TSENDSIZE 512
  46. #define DEFWINDOW 1024
  47. #define DEFSEG    1024
  48. #define TMAXSIZE 1024
  49. #define UMAXLEN 1024
  50. #define ICMPMAX 300 
  51. #else
  52. /*  define for AppleTalk */
  53. #define DADDLEN 4
  54. #define WINDOWSIZE 4096
  55. #define TSENDSIZE 512
  56. #define DEFWINDOW 512
  57. #define DEFSEG    512
  58. #define TMAXSIZE 512
  59. #define UMAXLEN 512
  60. #define ICMPMAX 300 
  61. #endif
  62.  
  63.  
  64. #ifdef PC
  65. /*
  66. *  define length of an integer
  67. */
  68. typedef char int8;
  69. typedef unsigned char uint8;
  70. typedef int int16;
  71. typedef long int int32;
  72. typedef unsigned int uint16;
  73. typedef unsigned long int uint32;
  74.  
  75.  
  76. #define TICKSPERSEC 18
  77. #define SMINRTO 5
  78. #define WRAPTIME 86400L                /* in seconds, only for PC */
  79. #define NPORTS    30
  80. #define CONNWAITTIME 20                /* default contime in seconds */
  81. uint32 longswap();
  82.  
  83. #else
  84. /*
  85. *  define length of an integer
  86. */
  87.  
  88. #define NFDEF {0,0,0}
  89. #define NBDEF {65535,65535,65535}
  90. #define BFDEF {0,61183,11060}
  91. #define BBDEF {61183,2079,4938}
  92. #define UFDEF {1,0,0}
  93. #define UBDEF {0,0,0}
  94.  
  95. typedef char int8;
  96. typedef unsigned char uint8;
  97.  
  98. #ifdef MPW
  99. typedef short int int16;
  100. typedef long int int32;
  101. typedef unsigned int uint;
  102. typedef unsigned short int uint16;
  103. typedef unsigned long int uint32;
  104. #define ctop(x) x
  105. #define ptoc(x) x
  106. #define index(x,y) strchr(x,y)
  107.  
  108. #define malloc(A) NewPtr(A)
  109. #define free(A) DisposPtr(A)
  110.  
  111. #else
  112. typedef int int16;
  113. typedef unsigned int uint;
  114. typedef long int32;                    /* BYU LSC */
  115. typedef unsigned int uint16;
  116. typedef unsigned long uint32;        /* BYU LSC */
  117. #endif
  118.  
  119. #define TICKSPERSEC 60
  120. #define SMINRTO 25
  121. #define NPORTS    30
  122. #define CONNWAITTIME 20                /* default contime in seconds */
  123.  
  124. #define    longswap(x) x
  125. #define intswap(x) x
  126. #ifndef MPW
  127. #define movebytes(x,y,z) memmove(x,y,(size_t) z)    /* BYU LSC */
  128. #define movenbytes(x,y,z) memmove(x,y,(size_t) z)    /* BYU LSC */
  129. #else
  130. #define movebytes(x,y,z) memcpy(x,y,z)
  131. #define movenbytes(x,y,z) memcpy(x,y,z)
  132. #endif 
  133. #define n_putchar(x) putchar(x)
  134. #define n_puts(x) putln(x)
  135. #define NPORTS    30
  136.  
  137. #ifdef MPW
  138. #define FALSE false
  139. #define TRUE true
  140. #endif MPW
  141. #endif
  142.  
  143. #include "netevent.h"
  144.  
  145.